<template>
    <el-form-item v-if="status == 'new'" label="广告系列名称" :prop="`campaign.campaign_name`" :rules="{required: true, message: '请输入', trigger: ['blur', 'change']}">
        <el-input v-model="dataForm.campaign.campaign_name" placeholder="请输入" style="width:500px" @change="sessionSave"></el-input>
    </el-form-item>
</template>

<script>
export default {
    props: ["dataForm"],
    components: {},
    name: "",
    data() {
        return {
            noset: "",
            status:""
        };
    },
    watch: {  
            // 开启深度监听  
        dataForm: {  
            handler(newVal, oldVal) {
                this.status = newVal.campaign.campaign_id ? 'existing':'new';
            },  
            deep: true,
            immediate: true, 
        }  
        },
    created() {
        this.$bus.on("tkFormSeries", (value) => {
            this.status = value;
        })
    },
    methods: {
        sessionSave(){
            this.$emit("sessionSave")
        }
    },
};
</script>


<style scoped>
</style>

